package com.neulogistics.contrib.warehouse.api.application.converter;

import cn.hutool.json.JSONUtil;
import com.neulogistics.contrib.warehouse.api.application.viewmodel.WarehouseTreeViewModel;
import com.neulogistics.contrib.warehouse.api.application.viewmodel.WarehouseViewModel;
import com.neulogistics.contrib.warehouse.domain.model.valueobject.Address;
import com.neulogistics.contrib.warehouse.infrastructure.persistence.orm.po.WarehousePO;
import org.springframework.beans.BeanUtils;

public class WarehouseTreePOVMConverter {
    public static WarehouseTreeViewModel POToVM(WarehousePO po){
        if(po == null)
            return null;

        WarehouseTreeViewModel viewModel = new WarehouseTreeViewModel();
        viewModel.setId(po.getWarehouseId());
        viewModel.setName(po.getWarehouseName());

        return viewModel;
    }
}
